#ifndef __STATE_MANAGER_H__
#define __STATE_MANAGER_H__

#include <vector>
#include "fwState.h"
#include "../Config/fwDllConfig.h"

class _DLL_LIB_API StateManager
{
private:
	std::vector<State*> m_lstPrepState;
	static StateManager * m_pInstance;
	
	State * m_pPrevState;
	State * m_pCurrState;
	State * m_pNextState;
private:
	StateManager();
public:
	~StateManager();

	static StateManager * GetInstance();
	static void DestroyInstance();

	void Resize(int iSize);
	void RegisterState(State * pState);
	void Switch(State * pState);
	void Switch(const char * szStateName);
	void Swtich(const int iStateID);

	void Destroy();
	void RemoveState(State * pState);

	State * GetCurrentState();
public:
	void ExternalSwitch();
};

#endif